The present invention generally relates to data, communication in a control system and, more particularly, relates to a master/slave control system and method for communicating data between a master controller and slave devices.
Modern automotive vehicles commonly employ various control systems equipped with electronic devices for controlling vehicle-related operations. For example, automotive vehicles are conventionally equipped with an engine control module (ECM) for controlling engine related operations, and a body controller generally for controlling electronic devices such as window motors, seat motors, headlamps, instrument panel electronics, etc. Many of the controllers in a vehicle are typically interconnected by way of a data communication bus which allows for the sharing of data amongst the various control systems.
In addition, some of the vehicle controllers communicate with lower level electronic devices, which are generally less sophisticated, in what is known as a master/slave control system. In the master/slave control system, the controller is commonly referred to as the master controller, while the lower level electronic devices are commonly referred to as slave devices. The master controller is typically connected via a serial data communication bus to a plurality of slave devices such that the master controller sends command messages to the slave devices to execute designated operations.
In the typical master/slave vehicle control system, the master controller typically broadcasts a command message with a unique address to the plurality of slave devices. Each slave device reads the command message and determines whether or not it has been addressed and, if so, performs the commanded function. In turn, the addressed slave device typically replies with a reply message that is broadcast on the data communication bus and is intended to be read by the master controller to provide feedback information such as fault and status information pertaining to the slave device. According to the conventional approach, the contents of both the command and reply messages require a certain number of bits dedicated to addressing the slave device.
In addition, the serial data bits associated with the command and reply messages may contain a parity bit with odd or even parity for the purpose of message validation. The parity bit generally includes either a binary xe2x80x9c0xe2x80x9d or a binary xe2x80x9c1xe2x80x9d and is selected to provide the message with an overall odd or even parity. That is, the total accumulated bits in the message, including the parity bit, will sum together to provide either an odd or an even number of binary xe2x80x9c1s.xe2x80x9d The parity bit is selected to provide either an odd or even parity to indicate that the message is a valid message.
According to the conventional vehicle master/slave control system, the command message includes a dedicated number of command bits, address bits, and the parity bit, while the reply message includes a dedicated number of feedback status information bits, address bits, and the parity bit. As a consequence, each slave device that is in data communication with the data communication bus reads and decodes every message that is broadcast on the data communication bus in order to determine whether or not the broadcast message is addressed to that corresponding slave device. The reply message generally contains dedicated address bits to inform the master controller which slave device is replying. According to this approach, each slave device typically reads and deciphers all reply messages to determine whether the message is directed to that corresponding slave device. It is therefore desirable to provide for a vehicle master/slave control system with enhanced data response, which more efficiently utilizes the bandwidth and reduces the reply message size.
According to the teachings of the present invention, a master/slave control system and method of communicating messages between a master controller and slave devices are provided. The system includes a data communication bus for communicating data messages. A plurality of slave devices are coupled to the data communication bus, and are addressable and capable of reading messages broadcast on the data communication bus and broadcasting reply messages to the data communication bus. A master controller is also coupled to the data communication bus for broadcasting command messages. The command messages include an address message for addressing at least one of the plurality of slave devices and a direction indicator parity bit for identifying the command message. The addressed slave device broadcasts a reply message which includes a reply direction indicating parity bit for identifying the reply message. The slave devices detect the parity of messages received and preferably ignore those messages identified as reply messages.
The master/slave control system and method of the present invention advantageously provides for reduction in size of the reply message, which leads to a faster system response and more efficient bandwidth utilization, while providing message validation. Accordingly, the present invention eliminates the need for dedicated addressing bits in the reply message.
These and other features, advantages and objects of the present invention will be further understood and appreciated by those skilled in the art by reference to the following specification, claims and appended drawings.